{% extends 'base-admin.html' %}

{% load pagination_tags %}

{% block main%}
    <table class='table table-bordered'>
        <tr>
            <td class=''>车辆型号</td>
            <td>{{ need.car_type }}</td>
        </tr>
        <tr>
            <td>需求描述</td>
            <td>{{ need.long_dsc }}</td>
        </tr>

        <tr>
            <td>联系方式</td>
            <td>{{ need.user.email }}</td>
        </tr>
        <tr>
            <td>操作</td>
            <td>
                <form action={% url 'admin_need_delete' need.id %} method="post">
                    {% csrf_token %}
                    <input type="submit" class="btn btn-danger"  value="删除">
                </form>
            </td>
        </tr>
    <table>



    <br/>
    <br/>
    <table class='table table-strip'>
        <tr>
            <th colspan="2">接单店铺</th>
        </tr>       
{% autopaginate order_records 8 %}
        {% for order_record in order_records %}
        <tr>
            <td class='' >{{ order_record.user.username }}</td>
            <td class='' >{{ order_record.created_at | date:"Y年m月d日 H时i分" }}</td>
        </tr>
        {% endfor %}
    </table>
{% paginate %}

{% endblock %}
